<layout
  th:replace="~{views/layout :: layout (
  page = 'tags',
  title = ${site.title} + ' - ' + '标签',
  pin = ~{::pin},
  header = ~{::header},
  main = ~{::main}
  )}"
>
  <!--/* pin */-->
  <th:block th:fragment="pin">
    <script id="pageScript" th:inline="javascript">
      Object.assign(window.MainApp.conf, {
        //第一屏
        enable_above: /*[[${theme.config.tags.enable_above}]]*/ '',
        above_background: /*[[${theme.config.tags.above_background}]]*/ '',
      });
    </script>
  </th:block>


  <!--/* header */-->
  <th:block th:fragment="header">
    <header th:class="${not theme.config.tags.enable_above ? 'header dp' : 'header'}">
      <!--/* 导航栏 */-->
      <th:block th:replace="~{views/nav}"/>

      <!--第一屏内容-->
      <section class="above" th:if="${theme.config.tags.enable_above}">
        <div class="above-info">
          <h1 class="above-title">标签</h1>
        </div>
      </section>
    </header>
  </th:block>


  <!--/* 內容 */-->
  <th:block th:fragment="main">
    <section class="content card" th:with="noData = ${not #lists.isEmpty(tags)}">
      <th:block th:if="${noData}">
        <div class="chart"></div>

        <div class="equinox">
          <a class="link "
             th:each="tag : ${tags}"
             th:text="${tag.spec.displayName}"
             th:data-postCount="${tag.postCount}"
             th:data-color="${tag.spec.color}"
             th:href="${tag.status.permalink}"></a>
        </div>
      </th:block>

      <th:block th:unless="${noData}" th:insert="~{views/components:: emptyData(false)}"></th:block>
    </section>
    <th:block th:replace="~{views/aside::common}"/>
  </th:block>
</layout>